<?php


use App\Http\Controllers\PayBillController;
use App\Http\Controllers\PayParamsController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', [PayParamsController::class, 'isbuild']);

Route::get('/payTest', [PayParamsController::class, 'isbuildTest']);

Route::get('/ass', [PayParamsController::class, 'getPayPlatformtest']);


Route::get('/getParams', [PayParamsController::class, 'getParams']);
Route::get('/getpayDe', [PayParamsController::class, 'createdParamsAliYun']);
Route::post('/plat', [PayParamsController::class, 'getPayPlatform']);
Route::post('/pay', [PayParamsController::class, 'pay']);

Route::get('/orderpay', [PayBillController::class, 'orderpay']);
Route::get('/getBillOrder', [PayBillController::class, 'getBillOrder']);

Route::group(['middleware' => ['web', 'wechat.oauth']], function () {
    Route::get('/getpay', [PayParamsController::class, 'createdParams']);
    Route::get('/getBillpay', [PayBillController::class, 'createdBillParams']);
    Route::get('/getpayTest', [PayParamsController::class, 'createdParamsTest']);
});




Route::post('/error', [PayParamsController::class, 'error']);


